package com.xing.radar.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class HelloController {
	
	@RequestMapping(value={"/","/hello"})
	public ModelAndView hello(){
		ModelAndView modelAndView = new ModelAndView();
		modelAndView.setViewName("index");
		return modelAndView;
	}
	
	@RequestMapping("myForm")
	public ModelAndView myForm(String rootUrl,String urlRegx){
		ModelAndView modelAndView = new ModelAndView();
		modelAndView.addObject("rootUrl", rootUrl);
		modelAndView.addObject("urlRegx", urlRegx);
		modelAndView.setViewName("index");
		return modelAndView;
	}
}
